import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/login'//登录
import Index from '@/components/index'//用户列表
import WithdrawaDetails from '@/components/withdrawaDetails' //提现明细
import FinancialDetails from '@/components/financialDetails '//资金明细
import Problem from '@/components/problem'//问题用户
import DayDetails from '@/components/dayDetails'//日活明细
import InviteDetails from '@/components/inviteDetails'//邀请明细
import RedpacketList from '@/components/redpacketList'//红包列表
import Lookpacket from '@/components/lookpacket'//查看红包
import OperateData from '@/components/operateData'//运营数据报表
import RedPacketData from '@/components/redPacketData' //红包运营数据报表
import DailyData from '@/components/dailyData'//每日运营报表
import NotFound from '@/components/404'

import Axios from 'axios'
Axios.defaults.baseURL = 'https://hbapire.zhongchoujia.com/'
Axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded'
Vue.prototype.$ajax = Axios



Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: {
        name: 'login'
      }
    },
    {
      path: '/index',
      name: 'index',
      component: Index
    },
    {
      path: '/withdrawaDetails',
      name: 'withdrawaDetails',
      component: WithdrawaDetails
    },
    {
      path: '/dayDetails',
      name: 'dayDetails',
      component: DayDetails
    },
    {
      path: '/inviteDetails',
      name: 'inviteDetails',
      component: InviteDetails
    },
    {
      path: '/problem',
      name: 'problem',
      component: Problem
    },
    {
      path: '/redpacketList',
      name: 'redpacketList',
      component: RedpacketList
    },
    {
      path: '/financialDetails',
      name: 'financialDetails',
      component: FinancialDetails
    },
    {
      path: '/operateData',
      name: 'operateData',
      component: OperateData
    },
    {
      path: '/redPacketData',
      name: 'redPacketData',
      component: RedPacketData
    },{
      path: '/dailyData',
      name: 'dailyData',
      component: DailyData
    },
    {
      path: '/lookpacket',
      name: 'lookpacket',
      component: Lookpacket
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path:'*',
      name:'404',
      component:NotFound,
    }
  ]
})
